View Rules...link from the Debugger tab, which will show the Rules with the actual incoming runtime data on the left, and the outgoing data on the right. This displays the actual data, processed by the rules as the application executes in design mode (Run Test menu option). The screen below illustrates an example of a log entry viewed within the Debugger, showing the data on the left before the rule was processed, and the resulting output data on the right, that is the required format after rule processing. The following image illustrates the various components of controllers that work together to receive data, execute the rules and also orchestrate with other controllers and system components to build complete applications.
Document Oriented Approach
Each controller uses an XML document for its working memory or data. The working memory is called the FactBase. This FactBase is constructed from the XML document initially passed to the controller and is retained in memory until rules processing is complete. It is then returned to the calling process or controller. The FactBase is updated as the rules are processed to reflect changes to the data. The FactBase can be altered by a range of available actions, including XSLT. The rendering of HTML pages is actually a transform of the XML data in the FactBase to HTML, before being sent to the Browser.
Normally, the structure of the FactBase will be in the same format as the action submission binding structures. This is detailed under the Designing Web Pages documentation, within the Bindings Tabs section.
Variables
As well as the main FactBase, each controller can define additional Variables, which can contain XML content. Whenever this documentation refers to querying or updating the FactBase, this can equally apply to Variables.
Variables are only temporary documents that exist during rules processing.
Checking Document Content
WebMaker rules generally manipulate XML data. WebMaker provides views for both the incoming data and outgoing data, as shown in the following screenshot.
WebMaker will attempt to display relevant documents for you automatically. The general aim of the rules is to manipulate the data shown on the left so that it matches that shown on the right.
When opening from the Debugger, you will see the actual data present at runtime. The exact information you see will depend on the type of log entry that was clicked. In this case, the information displayed is not permanently stored anywhere. You have the option to save the document for later use if required.
Regardless of what documents are initially displayed, you can use the Change buttons to select a different document to display on either side to assist with the creation of your rules.
XPath Entry
XPaths are used to query and manipulate XML data. You can create XPaths by dragging elements from the XML Tree Views and dropping them into the required XPath text areas in the middle.
XPaths can also be entered directly into the text areas, or edited after being constructed by the drag and drop operations. XPaths are typically validated as you type.
More information on common XPath queries is available on forum entry: A Guide to Useful XPath Queries.
WebMaker attempts to link the value to the current inputand
outputdocuments. Next to each XPath, a count will be displayed indicating the number of elements the XPath matches in both documents. Clicking on either count will open that document, and highlight the elements that have been matched. This allows you to see if your XPath is selecting the elements within the documents, as intended. Note: If an XPath is evaluated, but the data does not match then there will be no highlighting. Sometimes XPaths may simply seek to determine the presence of elements, or that an element has a particular value.